package com.sn.author.common.sdk.request;

import com.sn.author.common.sdk.AbstractRequest;
import com.sn.author.common.sdk.response.CollectionResponse;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * @Author xiaom
 * @Date 2020/10/19 16:13
 * @Version 1.0.0
 * @Description <>
 **/
@Getter
@Setter
public class CollectionRequest extends AbstractRequest implements Request<CollectionResponse> {


    private Integer num;

    private Long taskId;

    private String urlParam;

    private String header;

    @Override
    protected void setUrlParamsMap(Map<String, Object> map) {
        map.put("num",num);
        map.put("orderId",super.proxyOrder);
        map.put("apiKey",super.apiKey);
        map.put("code",super.areaCode);
        map.put("taskId",taskId);
        map.put("urlParam",urlParam);
        map.put("header",header);
    }

    @Override
    public String getApiUrl() {
        return super.getBaseUrl() + "/dy/getUsers";
    }

    @Override
    public Class<CollectionResponse> getResponseClass() {
        return CollectionResponse.class;
    }

    @Override
    public Object getUrlParams() {
        setUrlParamsMap(super.urlParamsMap);
        return super.urlParamsMap;
    }

    @Override
    public Object initRequestParams(Map<String, String> paramsMap) {
        return null;
    }
}
